@extends('admin.index')

@section('html-head')

@endsection

@section('html-body')
    <div class="panel panel-primary">
        <div class="panel-heading">用户列表</div>
        @if (isset($users) && count($users) > 0)
        <table class="table table-hover">
            <thead>
            <tr>
                <td>ID</td>
                <td>用户名</td>
                <td>Email</td>
                <td>手机号</td>
                <td>登录时间</td>
                <td>登录IP</td>
                <td>登录计数</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
            @foreach ($users as $user)
                <tr>
                    <td>{{ $user->id }}</td>
                    <td>{{ $user->username }}</td>
                    <td>{{ $user->email }}</td>
                    <td>{{ $user->phone }}</td>
                    <td>{{ $user->login_time }}</td>
                    <td>{{ $user->login_ip }}</td>
                    <td>{{ $user->login_count }}</td>
                    <td>
                        <a class="btn btn-info btn-in-table"
                           href="">详细</a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
        @else
            <div class="panel-body">
                无数据
            </div>
        @endif
        <div class="panel-footer">
            @if(isset($users))
                {!! $users->render() !!}
            @endif
        </div>
    </div>
@endsection